<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>opennars: nars.inference.BudgetFunctions.activate</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">opennars
   &#160;<span id="projectnumber">1.5.5</span>
   </div>
   <div id="projectbrief">1.5-ish</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="../../namespaces.html"><span>Packages</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d7/d11/classnars_1_1inference_1_1BudgetFunctions_aabac530761ea7ac0f43f0d1ea8d085c8.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="contents">
<a class="anchor" id="aabac530761ea7ac0f43f0d1ea8d085c8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void nars.inference.BudgetFunctions.activate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d4/d22/classnars_1_1entity_1_1Concept.html">Concept</a>&#160;</td>
          <td class="paramname"><em>concept</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BudgetStruct&#160;</td>
          <td class="paramname"><em>budget</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Activate a concept by an incoming TaskLink. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">concept</td><td>The concept </td></tr>
    <tr><td class="paramname">budget</td><td>The budget for the new item </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="../../de/d4e/BudgetFunctions_8java_source.html#l00183">183</a> of file <a class="el" href="../../de/d4e/BudgetFunctions_8java_source.html">BudgetFunctions.java</a>.</p>

<p>References <a class="el" href="../../db/d95/UtilityFunctions_8java_source.html#l00061">nars.inference.UtilityFunctions.aveAri()</a>, <a class="el" href="../../d9/de0/Item_8java_source.html#l00122">nars.entity.Item.getDurability()</a>, <a class="el" href="../../d9/de0/Item_8java_source.html#l00090">nars.entity.Item.getPriority()</a>, <a class="el" href="../../df/d62/Concept_8java_source.html#l00362">nars.entity.Concept.getQuality()</a>, <a class="el" href="../../db/d95/UtilityFunctions_8java_source.html#l00048">nars.inference.UtilityFunctions.or()</a>, <a class="el" href="../../d9/de0/Item_8java_source.html#l00130">nars.entity.Item.setDurability()</a>, <a class="el" href="../../d9/de0/Item_8java_source.html#l00098">nars.entity.Item.setPriority()</a>, and <a class="el" href="../../d9/de0/Item_8java_source.html#l00162">nars.entity.Item.setQuality()</a>.</p>

<p>Referenced by <a class="el" href="../../db/d0c/Memory_8java_source.html#l00200">nars.storage.Memory.activateConcept()</a>.</p>
<div class="fragment"><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;                                                                      {</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;        <span class="keywordtype">float</span> oldPri = concept.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_a97b35888ceaad90e7a428701051c51d7.html#a97b35888ceaad90e7a428701051c51d7">getPriority</a>();</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;        <span class="keywordtype">float</span> priority = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a24093a77b49f21322e62c9bed7ff5ee2.html#a24093a77b49f21322e62c9bed7ff5ee2">or</a>(oldPri, budget.getPriority());</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;        <span class="keywordtype">float</span> durability = <a class="code" href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a8abd4e228bb1ac62df2efdf4487ff34d.html#a8abd4e228bb1ac62df2efdf4487ff34d">aveAri</a>(concept.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_adbb21c1891722e30c1d6cfaf5fee18ee.html#adbb21c1891722e30c1d6cfaf5fee18ee">getDurability</a>(),</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;                budget.getDurability(), oldPri / priority);</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;        <span class="keywordtype">float</span> quality = concept.<a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_acf3c7af84e64586a6b1d549f02bfeead.html#acf3c7af84e64586a6b1d549f02bfeead">getQuality</a>();</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;        concept.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_aeda0763b2c90f6fef3f23b9b4d3d68f0.html#aeda0763b2c90f6fef3f23b9b4d3d68f0">setPriority</a>(priority);</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;        concept.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_a0f27e5a39dc50b5f108732f59199db22.html#a0f27e5a39dc50b5f108732f59199db22">setDurability</a>(durability);</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;        concept.<a class="code" href="../../d1/dd1/classnars_1_1entity_1_1Item_a686c257308a15eba9458a438cc60227a.html#a686c257308a15eba9458a438cc60227a">setQuality</a>(quality);</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    }</div>
<div class="ttc" id="classnars_1_1entity_1_1Item_aeda0763b2c90f6fef3f23b9b4d3d68f0_html_aeda0763b2c90f6fef3f23b9b4d3d68f0"><div class="ttname"><a href="../../d1/dd1/classnars_1_1entity_1_1Item_aeda0763b2c90f6fef3f23b9b4d3d68f0.html#aeda0763b2c90f6fef3f23b9b4d3d68f0">nars.entity.Item.setPriority</a></div><div class="ttdeci">void setPriority(float v)</div><div class="ttdoc">Set priority value. </div><div class="ttdef"><b>Definition:</b> <a href="../../d9/de0/Item_8java_source.html#l00098">Item.java:98</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Item_a97b35888ceaad90e7a428701051c51d7_html_a97b35888ceaad90e7a428701051c51d7"><div class="ttname"><a href="../../d1/dd1/classnars_1_1entity_1_1Item_a97b35888ceaad90e7a428701051c51d7.html#a97b35888ceaad90e7a428701051c51d7">nars.entity.Item.getPriority</a></div><div class="ttdeci">float getPriority()</div><div class="ttdoc">Get priority value. </div><div class="ttdef"><b>Definition:</b> <a href="../../d9/de0/Item_8java_source.html#l00090">Item.java:90</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1UtilityFunctions_a24093a77b49f21322e62c9bed7ff5ee2_html_a24093a77b49f21322e62c9bed7ff5ee2"><div class="ttname"><a href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a24093a77b49f21322e62c9bed7ff5ee2.html#a24093a77b49f21322e62c9bed7ff5ee2">nars.inference.UtilityFunctions.or</a></div><div class="ttdeci">static float or(float...arr)</div><div class="ttdoc">A function where the output is disjunctively determined by the inputs. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d95/UtilityFunctions_8java_source.html#l00048">UtilityFunctions.java:48</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1UtilityFunctions_a8abd4e228bb1ac62df2efdf4487ff34d_html_a8abd4e228bb1ac62df2efdf4487ff34d"><div class="ttname"><a href="../../d4/de4/classnars_1_1inference_1_1UtilityFunctions_a8abd4e228bb1ac62df2efdf4487ff34d.html#a8abd4e228bb1ac62df2efdf4487ff34d">nars.inference.UtilityFunctions.aveAri</a></div><div class="ttdeci">static float aveAri(float...arr)</div><div class="ttdoc">A function where the output is the arithmetic average the inputs. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d95/UtilityFunctions_8java_source.html#l00061">UtilityFunctions.java:61</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Item_adbb21c1891722e30c1d6cfaf5fee18ee_html_adbb21c1891722e30c1d6cfaf5fee18ee"><div class="ttname"><a href="../../d1/dd1/classnars_1_1entity_1_1Item_adbb21c1891722e30c1d6cfaf5fee18ee.html#adbb21c1891722e30c1d6cfaf5fee18ee">nars.entity.Item.getDurability</a></div><div class="ttdeci">float getDurability()</div><div class="ttdoc">Get durability value. </div><div class="ttdef"><b>Definition:</b> <a href="../../d9/de0/Item_8java_source.html#l00122">Item.java:122</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Concept_acf3c7af84e64586a6b1d549f02bfeead_html_acf3c7af84e64586a6b1d549f02bfeead"><div class="ttname"><a href="../../d4/d22/classnars_1_1entity_1_1Concept_acf3c7af84e64586a6b1d549f02bfeead.html#acf3c7af84e64586a6b1d549f02bfeead">nars.entity.Concept.getQuality</a></div><div class="ttdeci">float getQuality()</div><div class="ttdoc">Recalculate the quality of the concept [to be refined to show extension/intension balance]...</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d62/Concept_8java_source.html#l00362">Concept.java:362</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Item_a686c257308a15eba9458a438cc60227a_html_a686c257308a15eba9458a438cc60227a"><div class="ttname"><a href="../../d1/dd1/classnars_1_1entity_1_1Item_a686c257308a15eba9458a438cc60227a.html#a686c257308a15eba9458a438cc60227a">nars.entity.Item.setQuality</a></div><div class="ttdeci">void setQuality(float v)</div><div class="ttdoc">Set quality value. </div><div class="ttdef"><b>Definition:</b> <a href="../../d9/de0/Item_8java_source.html#l00162">Item.java:162</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Item_a0f27e5a39dc50b5f108732f59199db22_html_a0f27e5a39dc50b5f108732f59199db22"><div class="ttname"><a href="../../d1/dd1/classnars_1_1entity_1_1Item_a0f27e5a39dc50b5f108732f59199db22.html#a0f27e5a39dc50b5f108732f59199db22">nars.entity.Item.setDurability</a></div><div class="ttdeci">void setDurability(float v)</div><div class="ttdoc">Set durability value. </div><div class="ttdef"><b>Definition:</b> <a href="../../d9/de0/Item_8java_source.html#l00130">Item.java:130</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_aabac530761ea7ac0f43f0d1ea8d085c8_aabac530761ea7ac0f43f0d1ea8d085c8_cgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</p>

<p><div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_aabac530761ea7ac0f43f0d1ea8d085c8_aabac530761ea7ac0f43f0d1ea8d085c8_icgraph.svg" width="100%" height="388"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../d7/d81/namespacenars.html">nars</a></li><li class="navelem"><a class="el" href="../../d9/d79/namespacenars_1_1inference.html">inference</a></li><li class="navelem"><a class="el" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions.html">BudgetFunctions</a></li>
    <li class="footer">Generated on Sun Jan 10 2016 18:03:59 for opennars by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
